home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
- Begin VB.Form Editor
- BorderStyle = 1 'Fixed Single
- Caption = "Flashcard Editor"
- ClientHeight = 3390
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 7680
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Icon = "Editor.frx":0000
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3390
- ScaleWidth = 7680
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton cmdNew
- Caption = "&New"
- Height = 315
- Left = 75
- TabIndex = 13
- TabStop = 0 'False
- Top = 3000
- Width = 1290
- End
- Begin VB.TextBox txtWord
- Height = 690
- Left = 75
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 0
- Top = 300
- Width = 3465
- End
- Begin VB.TextBox txtDefinition
- Height = 690
- Left = 75
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 1
- Top = 1350
- Width = 3465
- End
- Begin VB.CommandButton cmdSaveAs
- Caption = "Save &As..."
- Height = 315
- Left = 2775
- TabIndex = 8
- TabStop = 0 'False
- Top = 3000
- Width = 1290
- End
- Begin VB.CommandButton cmdSave
- Caption = "&Save"
- Height = 315
- Left = 1425
- TabIndex = 7
- TabStop = 0 'False
- Top = 3000
- Width = 1290
- End
- Begin VB.CommandButton cmdAdd
- Caption = ">>"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 915
- Left = 3675
- TabIndex = 10
- Top = 75
- Width = 390
- End
- Begin VB.CommandButton cmdRemove
- Caption = "<<"
- Default = -1 'True
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 915
- Left = 3675
- TabIndex = 11
- Top = 1125
- Width = 390
- End
- Begin VB.ListBox lstWords
- Height = 2010
- Left = 4125
- TabIndex = 12
- TabStop = 0 'False
- Top = 75
- Width = 3465
- End
- Begin VB.CommandButton cmdOpenFile
- Caption = "&Open..."
- Height = 315
- Left = 6600
- TabIndex = 6
- TabStop = 0 'False
- Top = 2550
- Width = 990
- End
- Begin VB.TextBox txtOpenFile
- BackColor = &H8000000B&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 75
- Locked = -1 'True
- TabIndex = 5
- TabStop = 0 'False
- Top = 2550
- Width = 6540
- End
- Begin MSComDlg.CommonDialog CDialog
- Left = 0
- Top = 0
- _ExtentX = 847
- _ExtentY = 847
- _Version = 327680
- Filter = "Vocab Files (*.jfv) |*.jfv|"
- InitDir = "d:\"
- End
- Begin VB.CommandButton cmdClose
- Caption = "&Close"
- Height = 315
- Left = 6300
- TabIndex = 9
- TabStop = 0 'False
- Top = 3000
- Width = 1290
- End
- Begin VB.CommandButton cmdSort
- Caption = "Sort &Entries..."
- Height = 315
- Left = 4125
- TabIndex = 14
- Top = 2100
- Width = 1365
- End
- Begin VB.Label lblWord
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Word:"
- Height = 195
- Left = 75
- TabIndex = 2
- Top = 75
- Width = 525
- End
- Begin VB.Label lblDefinition
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Definition:"
- Height = 195
- Left = 75
- TabIndex = 3
- Top = 1125
- Width = 885
- End
- Begin VB.Label lblFileLocation
- AutoSize = -1 'True
- Caption = "Flashcard File Location:"
- Height = 195
- Left = 75
- TabIndex = 4
- Top = 2325
- Width = 2055
- End
- Attribute VB_Name = "Editor"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Compare Text
- Option Explicit
- Function CheckSaved() As Boolean
- Dim Results As Long
- If Saved = False Then
- Results = MsgBox(MESSAGE, vbQuestion + vbYesNoCancel)
- If Results = vbYes Then
- cmdSave_Click
- ElseIf Results = vbCancel Then
- CheckSaved = True
- Exit Function
- End If
- Saved = True
- End If
- End Function
- Private Sub cmdAdd_Click()
- If txtWord = "" Or txtDefinition = "" Then Exit Sub
- If InStr(1, txtWord, SEPCHARS) > 1 Or InStr(1, txtWord, BEGINCHARS) > 1 Then
- MsgBox INVCHARERR, vbExclamation
- Exit Sub
- End If
- txtWord.SetFocus
- Saved = False
- FlashContents.Add BEGINCHARS & txtWord & SEPCHARS & txtDefinition
- PrintOutEntries
- End Sub
- Private Sub cmdClose_Click()
- Unload Me
- End Sub
- Private Sub cmdNew_Click()
- If CheckSaved = True Then Exit Sub
- CloseFile
- DeleteListInfo
- txtOpenFile = ""
- End Sub
- Private Sub cmdOpenFile_Click()
- CDialog.ShowOpen
- If CDialog.FileName = "" Then Exit Sub
- txtOpenFile = CDialog.FileName
- Cards.LoadFile CDialog.FileName
- PrintOutEntries
- End Sub
- Private Sub cmdRemove_Click()
- If lstWords.ListIndex < 0 Then Exit Sub
- Saved = False
- FlashContents.Remove (lstWords.ListIndex + 1)
- lstWords.RemoveItem (lstWords.ListIndex)
- End Sub
- Private Sub cmdSave_Click()
- If OpenFile = "" Then
- DisplaySaveAs
- Exit Sub
- End If
- SaveFileContents (OpenFile)
- End Sub
- Private Sub cmdSaveAs_Click()
- DisplaySaveAs
- End Sub
- Sub DeleteListInfo()
- Dim i As Integer
- On Error Resume Next
- For i = lstWords.ListCount To 0 Step -1
- lstWords.RemoveItem i
- Next i
- End Sub
- Private Sub cmdSort_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- PopupMenu Cards!mnuDisplaySort, , cmdSort.Left + cmdSort.Width, cmdSort.Top
- PrintOutEntries
- End Sub
- Private Sub Form_Load()
- CDialog.InitDir = App.Path
- txtOpenFile = OpenFile
- Saved = True
- PrintOutEntries
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- If CheckSaved = True Then Exit Sub
- Unload Me
- End Sub
- Private Sub lstWords_Click()
- txtWord = GetRevealed(lstWords.ListIndex + 1)
- txtDefinition = GetHidden(lstWords.ListIndex + 1)
- cmdRemove.Default = True
- End Sub
- Sub PrintOutEntries()
- Dim i As Integer
- DeleteListInfo
- For i = 1 To FlashContents.Count
- lstWords.AddItem GetRevealed(i)
- Next i
- End Sub
- Private Sub DisplaySaveAs()
- CDialog.ShowSave
- If CDialog.FileName = "" Then Exit Sub
- txtOpenFile = CDialog.FileName
- SaveFileContents (CDialog.FileName)
- End Sub
- Private Sub txtDefinition_Change()
- CheckForAccents txtDefinition
- cmdAdd.Default = True
- End Sub
- Private Sub txtDefinition_GotFocus()
- SelectAll txtDefinition
- End Sub
- Private Sub txtWord_Change()
- CheckForAccents txtWord
- cmdAdd.Default = True
- End Sub
- Private Sub txtWord_GotFocus()
- SelectAll txtWord
- cmdAdd.Default = True
- End Sub
-